﻿using System.Collections.Generic;
using System.Linq;
using Crystal.Common.Model;
using System.Data;
using System.Linq.Expressions;
using System;
using System.IO;
using System.ComponentModel;
using Crystal.CLL;

namespace CrystalCommon.BLL
{
    public class LoginManager : IDisposable
    {
        #region Fields

        #endregion

        #region Constructors

        public LoginManager()
        {
        }

        #endregion

        #region Methods
        public void Dispose() { }
        public List<USR_Users> CheckLoginCredentials(CrystalEntities context, string username, string password)
        {
            string strDeletedUsers = UserStatus.DELTE.ToString();
            var query = (from c in context.USR_Users
                         where c.UserName == username && c.Password == password
                         select c);
            return new List<USR_Users>(query.ToList());
        }
        #endregion
    }
}
